﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using DataAnnotationsExtensions;

namespace PersonalSite.Models
{
    public class ContactViewModel
    {
        [Email]
        [Required(ErrorMessage = "Contact e-mail address is required.")]
        [DataType(DataType.EmailAddress)]
        [DisplayName("Contact e-mail address *")]
        public string From { get; set; }

        [Required(ErrorMessage = "Subject is required.")]
        [DisplayName("Subject *")]
        public string Subject { get; set; }

        [Required(ErrorMessage = "Message is required.")]
        [DisplayName("Message *")]
        [MinLength(5, ErrorMessage = "Message should not be less than 5 characters")]
        public string Message { get; set; }
    }
}